package com.dyz.view;

import java.awt.event.ActionListener;
import java.util.Calendar;

import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;

import com.dyz.model.MyDate;



public class WidokRoboczy extends JFrame {
	
	
	
	private JPanel contentPane;
	private JMenuItem menuItem1, menuItem2, menuItem3;
	private JMenuItem menuItem0;
	private JPanel panel = new JPanel();
	Calendar calendar = Calendar.getInstance();

	
    

	

	public WidokRoboczy() {
		
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 776, 364);

		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		menus();

		
		
		this.setVisible(true);
		
	}
	
	public void addPanel(JPanel jp){
		contentPane.add(jp);
		this.repaint();
	}
	
	private void menus() {
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);

		JMenu menuPlik = new JMenu("File");
		menuBar.add(menuPlik);

		menuItem0 = new JMenuItem("New");
		menuItem0.setActionCommand("new");
		menuPlik.add(menuItem0);

		menuItem1 = new JMenuItem("open");
		menuItem1.setActionCommand("open");
		menuPlik.add(menuItem1);

		menuItem2 = new JMenuItem("save");
		menuItem2.setActionCommand("save");
		menuPlik.add(menuItem2);

		menuItem3 = new JMenuItem("close");
		menuItem3.setActionCommand("close");
		menuPlik.add(menuItem3);
	}
	
	public void addMemuListener(ActionListener l) {
		menuItem0.addActionListener(l);
		menuItem1.addActionListener(l);
		menuItem2.addActionListener(l);
		menuItem3.addActionListener(l);

	}


}
